package com.ostrich.xflowlayoutdemo.room;

import java.util.List;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

/**
 * @Author : yaotianxue
 * @Time : On 2023/9/25 10:51
 * @Description : HistoryDao
 */
@Dao
public interface HistoryDao {
    //插入数据
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(HistoryEntity historyEntity);
    //查询数据
    @Query("select * from history")
    List<HistoryEntity> selectAll();
    //清空数据
    @Query("delete from history")
    void clear();

}
